package com.example.flowable.controller;

import com.example.flowable.service.FlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author zkh
 * @date 2023-11-06
 * @desc
 */
@RestController
@RequestMapping("/flow")
public class FlowController {
    @Autowired
    private FlowService flowService;

    @RequestMapping(value = "/start")
    @ResponseBody
    public Boolean startFlow(HttpServletRequest request, HttpServletResponse response) {
        return flowService.startEngine();
    }
}
